<?php
abstract class Supply
{
    /**
     * 用品拥有者
     * @var Person
     */
    protected $_person = null;
    /**
     * 用品数量
     * @var int
     */
    public $number = 0;
    public function __construct( $person )
    {
        if ( $person )
        {
            $this->_person = $person;
        }
        else return false;
    }
    public abstract function useSupply();
    public function checkNum()
    {
        return $this->_number;
    }
    public function addSupply( $num )
    {
        if ( is_numeric( $num ) )
        {
            $this->_number += $num;
        }
        else return false;
    }
}
?>